//创建掌握的控制器JS
msqbapp.controller('zhangwoController',function ($scope,msqbService) {
    $scope.userId = 0;
    $scope.classifyId = 0;
    $scope.tagFlag = 0;
    //创建掌握的初始化函数
    $scope.zhangwoInit = function () {
        var arr = window.location.search.split('&');
        for (var i = 0;i<arr.length;i++){
            var strarr = arr[i].split('=');
            if(strarr[0]=='?userId'){
                $scope.userId = strarr[1];
            }
            if(strarr[0]=='classifyId'){
                $scope.classifyId = strarr[1];
            }
            if(strarr[0]=='tagFlag'){
                $scope.tagFlag = strarr[1];
            }
        }
        //得到掌握列表
        msqbService.getReadTagTopicList($scope.classifyId,$scope.userId,$scope.tagFlag).success(function (resp) {
            $scope.zhangwoList = resp;
        });
    };
    //具体题目
    $scope.getTopicItem=function (userId,topicId,title) {
        window.open("topicitem.html?userId="+userId+"&topicId="+topicId+"&title="+title);
    };

});